<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link rel="stylesheet" href="__PUBLIC__/assets/css/jquery-ui.css" />
</block>
<block name="stylecss">
<style type='text/css'>
.UploadBox{overflow:hidden;width:500px}
.UploadValue{width:260px;float:left;margin-right:4px;text-indent:6px}
.UploadConfirm{position:absolute;top:0;left:0;height:35px;filter:alpha(opacity:0);opacity:0;width:337px}
table{
    width:100%;
}
table td{
    padding: 3px;
}
table td input{
    vertical-align: middle;
}
.profile-info-name{
    width: 200px;
}
.profile-info-value{
    width:90%;
}
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
        <a href="{:U('Adminauth/authgroup')}">权限组列表</a>
    </li>
    <li class="active">修改权限组</li>
</ul><!-- /.breadcrumb -->

</block>

<block name="content">
<form action="__CONTROLLER__/authgroup_edit" method='post' id='myformedit' enctype="multipart/form-data">
<input type="hidden" name="action" value="authgroup_edit_action">
<input type="hidden" name="id" value="{$authgroup_arr.id}">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-purple"><i class="ace-icon fa fa-user bigger-120"></i> 修改权限组 </span></div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:200px;"> 权限组名称 </div>

    <div class="profile-info-value">
        <input type="text" name="title" value="{$authgroup_arr.title}" class="col-xs-12">
    </div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:200px;"> 拥有的权限 </div>

    <div class="profile-info-value">
    	<table class="table table-striped table-bordered table-hover">
        	<?php
        		for ($i=0; $i < $cols; $i++) {
					echo('<tr>');
					for ($j=0; $j < 5; $j++) {
						echo('<td>');
                        if (!empty($auth_arr[$i*5+$j]['id'])) {
                        ?>
                        <input type="checkbox" style="margin:0" name="rules[]" id="cb{$auth_arr[$i*5+$j]['id']}" value="{$auth_arr[$i*5+$j]['id']}"
                            <?php if ($authgroup['rules'] == '*' || in_array($auth_arr[$i*5+$j]['id'], $rule_arr)) {
                                echo "checked";
                            }?>
                        >&nbsp;&nbsp;<label  for="cb{$auth_arr[$i*5+$j]['id']}" >{$auth_arr[$i*5+$j]['title']}</lable>
                        <?php
                        }
						echo('</td>');
					}
					echo('</tr>');
        		}
        	?>
        </table>
    </div>
</div>

<div style="margin-top:20px">
    <button type="submit" class="btn btn-sm btn-primary">修改</button>
    <span class="btn btn-sm" onClick="location.href='{:U('Adminauth/authgroup')}'">返回</span>
</div>
</form>
</block>
<block name="scripts"></block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_adminauth').addClass('active open');
        $('#menu_adminauth_auth').addClass('active');
    });
</script>
<script script="text/javascript">

</script>
</block>